<div class="centercontent tables">
<div class="pageheader notab">
<h1 class="pagetitle">Manajemen Inventaris Barang</h1>

<span class="pagedesc">Informasi daftar inventaris barang</span> 
</div>
<!--pageheader-->
<div id="contentwrapper" class="contentwrapper"><br />
<div class="contenttitle2">
<h3>Daftar Inventaris Barang</h3>
</div>
<!--contenttitle-->
<?php if($sukses != ''){ ?>
                   <div class="notibar msgsuccess">
                        <a class="close"></a>
                        <p><?php echo $sukses; ?></p>
                    </div>
					<?php } else if($gagal != ''){ ?>
					<div class="notibar msgerror">
                        <a class="close"></a>
                        <p><?php echo $gagal; ?></p>
                    </div>
					<?php 
					}
					?>
<?php if($barang->num_rows() > 0){?>
<table class="stdtable" id="dyntable" border="0" cellpadding="0" cellspacing="0">
<colgroup><col class="con0" /><col class="con1" /><col class="con0" /><col class="con1" /><col class="con0" /></colgroup> 
<thead> 
	<tr>
	<th class="head0">Foto Barang</th>
	<th class="head1">Kode Barang</th>
	<th class="head0">Nama Barang</th>
	<th class="head1">Keterangan</th>
	<th class="head0">Kondisi Barang</th>
	<th align="center" class="head1">Pilihan</th>
	</tr>
</thead> 
<tfoot> 
	<tr>
	<th class="head0">Foto Barang</th>
	<th class="head1">Kode Barang</th>
	<th class="head0">Nama Barang</th>
	<th class="head1">Keterangan</th>
	<th class="head0">Kondisi Barang</th>
	<th align="center" class="head1">Pilihan</th>
	</tr>
</tfoot> 
<tbody>
	<?php 
						foreach($barang->result() as $row){			
			 		?>
	<tr class="gradeA">
	<td align="center" ><?php echo '<a href= \'' . base_url().$row->foto_barang . '\' target="_blank"><img border=\'0\' src=\'' . base_url().$row->foto_barang . '\' height=\'50\' ></a> '; ?></td>
	<td><?php echo $row->kode_barang; ?></td>
	<td><?php echo $row->nama_barang; ?></td>
	<td><?php echo $row->keterangan; ?></td>
	<td><?php echo $row->kondisi_inventaris; ?></td>
	<td align="center">
	<a href="<?php echo base_url().'index.php/pengelolaan_inventaris/detail_barang/'.$row->kode_barang; ?>" title='Detail' class="btn btn4 btn_yellow btn_search radius50" alt="Detail"></a>
	<?php 
	$role_jabatan = $this->session->userdata('id_jabatan');
	if($role_jabatan == '2' || $role_jabatan == '4'){
	?>
	<a href="<?php echo base_url().'index.php/pengelolaan_inventaris/edit_proses/'.$row->kode_barang; ?>" title='Edit' class="btn btn4 btn_yellow btn_flag" alt="Edit"></a>
	<a href="<?php echo base_url().'index.php/pengelolaan_inventaris/hapus_inventaris/'.$row->kode_barang; ?>" title='Hapus' class="btn btn4 btn_yellow btn_trash" alt="Hapus" onclick="return confirm('Apa Anda yakin untuk menghapus inventaris <?php echo $row->kode_barang;?>' ) "></a>
	<?php } ?>
	</td>

	</tr>
	 <?php
					  } 
					  ?> 
					  
	</tbody>
</table><?php } else { echo 
						 '<div class="notibar msginfo">
							<p>Data Inventaris Barang Belum Ada.</p>
						  </div>';
					}
			  		?> 
<!--contenttitle--></div>
<!--contentwrapper--> </div>
<!-- centercontent -->